﻿@using BOSS.Web.Extensions

@model BOSS.Domain.Products.Product

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/MainPanel.cshtml";
}

@section HeadContent
{
<script type="text/javascript">

    var toolbarItems = [
            {
                text: '修改',
                handler: function () {
                    updateTab('修改产品信息 - @(Model.Name + "(" + Model.Model +")")', '@Url.Action("Create", new { id = Model.Id })');
                }
            }
        ];

    window.onInitUI = function () {
        var commonPanle = new Ext.Panel({
            title: '基本信息',
            collapsible: true,
            padding: '5px',
            renderTo: 'commonCt',
            contentEl: 'common'
        });
    };
</script>
}

<div class="x-hidden">
    <div id="common">
        <table>
            <tr>
                <th>产品名称</th>
                <td>@Html.Encode(Model.Name)</td>
                <th>产品型号</th>
                <td>@Html.Encode(Model.Model)</td>
            </tr>
            <tr>
                <th>产品规格</th>
                <td>@Html.Encode(Model.Specification)</td>
                <th>可销售</th>
                <td>@Html.Encode(Model.Marketable? "是" : "否")</td>
            </tr>
            <tr>
                <th>使用次数</th>
                <td>@Html.Encode(Model.UseCount)</td>
                <th>采购价格</th>
                <td>@Html.Encode(Model.ProcurementPrice)</td>
            </tr>
            <tr>
                <th>销售价格</th>
                <td>@Html.Encode(Model.SellingPrice)</td>
                <th></th>
                <td></td>
            </tr>
            <tr>
                <th>创建人</th>
                <td>@Html.Encode(Model.Creator)</td>
                <th>创建时间</th>
                <td>@Html.EncodeDateTime(Model.CreateTime)</td>
            </tr>
            <tr>
                <th>修改人</th>
                <td>@Html.Encode(Model.Updator)</td>
                <th>修改时间</th>
                <td>@Html.EncodeDateTime(Model.UpdateTime)</td>
            </tr>
        </table>
    </div>
</div>
    
<div class="details">
    <div id="commonCt" style="margin: 5px;"></div>
</div>

